package cn.bx.consumer.service;

import org.example.pojo.Answer;
import org.example.pojo.Question;
import org.example.service.MainServiceI;
import org.example.util.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class MainService implements MainServiceI {
    @Autowired
    private MainFeignClient mainFeignClient;

    @Override
    public AjaxResult searchAll() {
        return mainFeignClient.searchAll();
    }

    @Override
    public AjaxResult getBy(long id) {
        return mainFeignClient.getBy(id);
    }

    @Override
    public AjaxResult addQuestion(Question question) {
        return mainFeignClient.addQuestion(question);
    }

    @Override
    public AjaxResult addAnswer(Answer answer) {
        return mainFeignClient.addAnswer(answer);
    }

    @Override
    public AjaxResult getAnswer(long id) {
        return mainFeignClient.getAnswer(id);
    }
}
